package com.lbssoft.gpsbd.model;

import java.util.Date;

public class Event {

	private long id;
	
	private int type;// -1 未知，0离线，1上线，2进入围栏，3离开围栏，4超速

	private long positionId;

	private Integer geofenceId;
	
	private Date time;
	
	private long deviceId;

	private String attributes;

	private String address;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public long getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(long deviceId) {
		this.deviceId = deviceId;
	}

	private boolean isRead;

	public boolean isRead() {
		return isRead;
	}

	public void setRead(boolean read) {
		isRead = read;
	}

	public long getPositionId() {
		return positionId;
	}

	public void setPositionId(long positionId) {
		this.positionId = positionId;
	}

	public Integer getGeofenceId() {
		return geofenceId;
	}

	public void setGeofenceId(Integer geofenceId) {
		this.geofenceId = (geofenceId==0?null:geofenceId);
	}


	public String getAttributes() {
		return attributes;
	}

	public void setAttributes(String attributes) {
		this.attributes = attributes;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
}
